//! 事件委托器
//!
//! 在 sgs_pkg_std 中实现具体类型
//!
//!
//!

mod global;
mod lifecycle;
mod setup;
mod start;
pub use global::*;
pub use lifecycle::*;
pub use setup::*;
pub use start::*;

use sgs_runtime::{
    executor::{Controller, Event, Viewer},
    pkg::Delegate,
};

/// 标准包基本事件委托器
///
pub struct StdDelegator;

impl std::fmt::Debug for StdDelegator {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "标准包基本事件委托器[sgs_pkg_std::StdDelegator]")
    }
}

impl Delegate for StdDelegator {
    fn delegate(
        &self,
        event: &Event,
        _viewer: &Viewer,
        _controller: &mut Controller,
    ) -> Option<Event> {
        match event {
            _ => None,
        }
    }
}
